home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / WindowMaker / src / dock.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-30  |  3.6 KB  |  118 lines

  1. /* dock.h- built-in Dock module for WindowMaker
  2.  * 
  3.  *  Window Maker window manager
  4.  * 
  5.  *  Copyright (c) 1997, 1998 Alfredo K. Kojima
  6.  *  Copyright (c) 1998       Dan Pascu
  7.  * 
  8.  *  This program is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2 of the License, or
  11.  *  (at your option) any later version.
  12.  *
  13.  *  This program is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with this program; if not, write to the Free Software
  20.  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
  21.  *  USA.
  22.  */
  23.  
  24. #ifndef WMDOCK_H_
  25. #define WMDOCK_H_
  26.  
  27.  
  28. #include "appicon.h"
  29. #include "funcs.h"
  30.  
  31.  
  32. typedef struct WDock {
  33.     WScreen *screen_ptr;
  34.     int x_pos, y_pos;               /* position of the first icon */
  35.  
  36.     WAppIcon **icon_array;           /* array of docked icons */
  37.     int max_icons;
  38.  
  39.     int icon_count;
  40.  
  41. #define WM_DOCK        0
  42. #define WM_CLIP        1
  43. #define NORMAL_DOCK    WM_DOCK
  44. #define EXTENDED_DOCK  WM_CLIP
  45.     int type;
  46.  
  47.     WMagicNumber auto_expand_magic;
  48.     WMagicNumber auto_collapse_magic;
  49.     WMagicNumber auto_raise_magic;
  50.     WMagicNumber auto_lower_magic;
  51.     unsigned int auto_collapse:1;      /* if clip auto-collapse itself */
  52.     unsigned int auto_raise_lower:1;   /* if clip should raise/lower when
  53.                                         * entered/leaved */
  54.     unsigned int on_right_side:1;
  55.     unsigned int collapsed:1;
  56.     unsigned int mapped:1;
  57.     unsigned int lowered:1;
  58.     unsigned int attract_icons:1;      /* If clip should attract app-icons */
  59.  
  60.     unsigned int lclip_button_pushed:1;
  61.     unsigned int rclip_button_pushed:1;
  62.     
  63.     struct WMenu *menu;
  64.  
  65.     struct WDDomain *defaults;
  66. } WDock;
  67.  
  68.  
  69.  
  70.  
  71.  
  72. WDock *wDockCreate(WScreen *scr, int type);
  73. WDock *wDockRestoreState(WScreen *scr, proplist_t dock_state, int type);
  74.  
  75. void wDockDestroy(WDock *dock);
  76. void wDockHideIcons(WDock *dock);
  77. void wDockShowIcons(WDock *dock);
  78. void wDockLower(WDock *dock);
  79. void wDockRaise(WDock *dock);
  80. void wDockRaiseLower(WDock *dock);
  81. void wDockSaveState(WScreen *scr, proplist_t old_state);
  82.  
  83. Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y);
  84. Bool wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
  85.           int *ret_x, int *ret_y, int redocking);
  86. Bool wDockFindFreeSlot(WDock *dock, int *req_x, int *req_y);
  87. void wDockDetach(WDock *dock, WAppIcon *icon);
  88.  
  89. void wDockTrackWindowLaunch(WDock *dock, Window window);
  90. WAppIcon *wDockFindIconForWindow(WDock *dock, Window window);
  91. void wDockDoAutoLaunch(WDock *dock, int workspace);
  92. void wDockLaunchWithState(WDock *dock, WAppIcon *btn, WSavedState *state);
  93.  
  94. #ifdef REDUCE_APPICONS
  95. void wDockSimulateLaunch(WDock *dock, WAppIcon *btn);
  96. #endif
  97.  
  98. #ifdef OFFIX_DND
  99. int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
  100. #endif
  101.  
  102. void wClipIconPaint(WAppIcon *aicon);
  103. void wClipSaveState(WScreen *scr);
  104. proplist_t wClipSaveWorkspaceState(WScreen *scr, int workspace);
  105. WAppIcon* wClipRestoreState(WScreen *scr, proplist_t clip_state);
  106.  
  107. void wClipUpdateForWorkspaceChange(WScreen *scr, int workspace);
  108.  
  109. RImage *wClipMakeTile(WScreen *scr, RImage *normalTile);
  110.  
  111. #define WO_FAILED          0
  112. #define WO_NOT_APPLICABLE  1
  113. #define WO_SUCCESS         2
  114.  
  115. int wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent);
  116.  
  117. #endif
  118.